//
//  YXChangeCodeView.m
//  跑跑快销
//
//  Created by 杨潇 on 14-4-30.
//  Copyright (c) 2014年 ylife. All rights reserved.
//

#import "YXChangeCodeView.h"

@implementation YXChangeCodeView
@synthesize phoneNumberTF,codeTF,changeCodeTF,getCodeBtn,affirmBtn;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
        UILabel * introduceLab = [[UILabel alloc] initWithFrame:CGRectMake(10, 20, 300, 40)];
        introduceLab.font = [UIFont systemFontOfSize:15];
        introduceLab.textColor = [UIColor brownColor];
        introduceLab.text = @"绑定新的注册码后，将是正式版的用户，无极限体验强大的销售管理功能。";
        introduceLab.numberOfLines = 0;
        introduceLab.lineBreakMode = NSLineBreakByWordWrapping;
        [self addSubview:introduceLab];
        
        phoneNumberTF = [[UITextField alloc] initWithFrame:CGRectMake(10, introduceLab.frame.origin.y + introduceLab.frame.size.height, 300, 40)];
        [phoneNumberTF addTarget:self action:@selector(keyboardDown) forControlEvents:UIControlEventEditingDidEndOnExit];
        phoneNumberTF.borderStyle = UITextBorderStyleRoundedRect;
        phoneNumberTF.placeholder = @"输出手机号码";
        [self addSubview:phoneNumberTF];
        
        codeTF = [[UITextField alloc] initWithFrame:CGRectMake(10, phoneNumberTF.frame.origin.y + phoneNumberTF.frame.size.height + 20, 145, 40)];
        [codeTF addTarget:self action:@selector(keyboardDown) forControlEvents:UIControlEventEditingDidEndOnExit];
        codeTF.borderStyle = UITextBorderStyleRoundedRect;
        codeTF.placeholder = @"输出短信验证码";
        [self addSubview:codeTF];
        
        getCodeBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
        getCodeBtn.backgroundColor = [UIColor blueColor];
        [getCodeBtn setTitle:@"获取验证码" forState:UIControlStateNormal];
        getCodeBtn.frame = CGRectMake(codeTF.frame.origin.x + codeTF.frame.size.width + 10, codeTF.frame.origin.y, 145, 40);
        [self addSubview:getCodeBtn];
        
        changeCodeTF = [[UITextField alloc] initWithFrame:CGRectMake(10, codeTF.frame.origin.y + codeTF.frame.size.height + 20, 300, 40)];
        [changeCodeTF addTarget:self action:@selector(keyboardDown) forControlEvents:UIControlEventEditingDidEndOnExit];
        changeCodeTF.borderStyle = UITextBorderStyleRoundedRect;
        changeCodeTF.placeholder = @"更换正式版激活码";
        [self addSubview:changeCodeTF];
        
        affirmBtn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
        affirmBtn.backgroundColor = [UIColor blueColor];
        [affirmBtn setTitle:@"确认修改" forState:UIControlStateNormal];
        affirmBtn.frame = CGRectMake(10, changeCodeTF.frame.origin.y + changeCodeTF.frame.size.height + 20, 300, 40);
        [self addSubview:affirmBtn];
    }
    return self;
}

- (void)keyboardDown
{
    
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
